package com.atguigu.gmall.user.service.impl;

import com.atguigu.gmall.model.user.UserAddress;
import com.atguigu.gmall.user.mapper.UserAddressMapper;
import com.atguigu.gmall.user.service.UserAddressService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 搭忆长安
 * @version 1.0
 * @date 2021年07月10日 16:17
 * @ClassName:UserAddressServiceImpl
 * @Description: TODO
 */
@Service
public class UserAddressServiceImpl extends ServiceImpl<UserAddressMapper, UserAddress> implements UserAddressService {
    @Override
    public List<UserAddress> findUserAddressListByUserId(String userId) {
        List<UserAddress> list = list(new LambdaQueryWrapper<UserAddress>().eq(UserAddress::getUserId, userId));

        return list;
    }
}
